<template>
  <div>
    <div
      class="item"
      v-for="item in list"
      :key="item.id"
      @click="$router.push({ path: '/detail/' + item.id })"
    >
      <ItemItem :item="item"></ItemItem>
    </div>
  </div>
</template>

<script>
import ItemItem from "@/components/ItemItem.vue";

export default {
  components: { ItemItem },

  mounted() {
    this.$refs.content.innerHTML = this.item.content;
  },
  name: "ListItem",
  props: {
    list: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {};
  },
  created() {},
  methods: {},
};
</script>

<style></style>
